<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!doctype html>
<html lang="en">

	<head>
		<title>新建会议任务</title>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<!-- VENDOR CSS -->
		<link rel="stylesheet" href="styles/css/bootstrap.min.css">
		<link rel="stylesheet" href="styles/css/jquery-ui.min.css" />
		<link rel="stylesheet" href="styles/css/font-awesome.min.css">
		<link rel="stylesheet" href="styles/css/style.css">
		<!-- MAIN CSS -->
		<link rel="stylesheet" href="styles/css/main.css">
		<!-- FOR DEMO PURPOSES ONLY. You should remove this in your project -->
		<link rel="stylesheet" href="styles/css/demo.css">
		<!-- GOOGLE FONTS -->
		<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700" rel="stylesheet">
		<!-- ICONS -->
		<link rel="apple-touch-icon" sizes="76x76" href="styles/images/apple-icon.png">
		<link rel="icon" type="image/png" sizes="96x96" href="styles/images/favicon.png">
	</head>

	<body>
		<!-- WRAPPER -->
		<div id="wrapper">
			<!-- NAVBAR -->
			<%@ include file="common/navbar.html"%>
			<!-- END NAVBAR -->
			<!-- LEFT SIDEBAR -->
			<%@ include file="common/sidebar.html"%>
			<!-- END LEFT SIDEBAR -->
			<!-- MAIN -->
			<div class="main">
				<!-- MAIN CONTENT -->
				<div class="main-content">
					<div class="container-fluid">
						<h3 class="page-title">会议任务分配</h3>

						<form method="get" action="newMeetingTaskExec1" class="form-horizontal" role="form" onsubmit="return beforeSubmit()">
							<div class="row">
								<div class="col-md-12">
									<div class="panel panel-default panel-headline">
										<div class="panel-body">

											<div class="form-group">
												<label class="col-md-1 control-label" style="text-align: left;">会议任务：</label>
												<div class="col-md-2">
													<select id="pid_select" class="form-control" name="meetingTask.pmDeptTask.deptTaskId" onchange="changeDeptTask(this)">
														<s:iterator value="deptTasks" status="st">
															<option value="${deptTaskId}">${deptTaskName}</option>
														</s:iterator>
													</select>
												</div>
											</div>
											<script>
												deptTasks=[];
												<s:iterator value="deptTasks" status="st">
													var deptTask={};
													deptTask.deptTaskId="${deptTaskId}";
													deptTask.deptTaskPlanStartTime="${deptTaskPlanStartTime}"; 
													deptTask.deptTaskPlanEndTime="${deptTaskPlanEndTime}"; 
													deptTask.deptTaskPoint="${deptTaskPoint}";
													deptTasks.push(deptTask);
												</s:iterator>
												console.log(deptTasks);
											</script>
											<hr/>
											<div class="row">
												<div class="col-md-6">
													<label>任务时间要求：<span id="deptTaskPlanStartTime"></span> ---------- <span id="deptTaskPlanEndTime"></span></label>
												</div>
												<div class="col-md-6">
													<label>任务可用分值:  <cite id="deptTaskPoint"></cite> 分</label>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>

							<div class="row">
								<div class="col-md-8">
									<!-- PANEL HEADLINE -->

									<div class="panel panel-headline">
										<div class="panel-heading">
											<h3 class="panel-title">任务说明</h3>
											<br>
											<div class="form-group">
												<label class="control-label col-md-2" style="text-align: left;">任务名称：</label>
												<div class="col-md-5 ">
													<input type="text" class="form-control" name="taskName" placeholder="输入任务名称" />
													<span><font id="check_taskName" color="red"></font></span>
												</div>
											</div>
										</div>
										<div class="panel-body">
											<textarea class="form-control" name="taskContent" id="task_detail" rows="18" placeholder="任务详细说明"></textarea>
											<span><font color="red" id="check_detail"></font></span>
										</div>
									</div>
									<!-- END PANEL HEADLINE -->
								</div>
								<div class="col-md-4">
									<!-- PANEL NO PADDING -->
									<div id="panel-finall-ask" class="panel">
										<div class="panel-heading">
											<h3 class="panel-title">任务结束要求</h3>
											<br>
											<br>
											<textarea class="form-control" name="taskRequirement" id="task_request" rows="6"></textarea>
											<span><font color="red" id="check_taskRequest"></font></span>
										</div>
										<div class="panel-body">
										</div>
									</div>
									<!-- END PANEL NO PADDING -->
									<div id="panel-detal" class="panel">
										<div class="panel-heading">
											<h3 class="panel-title">任务周期</h3>
										</div>
										<div class="panel-body no-padding bg-primary text-center">
											<div class="padding-top-30 padding-bottom-30">
												<div class="form-group">
													<label class="control-label col-md-3 ">开始时间：</label>
													<div class="col-md-7 ">
														<input type="text" class="form-control task_start_time" id="meeting_task_start_time" name="taskPlanStartTime" placeholder="任务开始时间" />
														<span><font color="red" id="check_meeting_task_start_time"></font></span>
													</div>
												</div>
												<div class="form-group">
													<label class="control-label col-md-3">结束时间：</label>
													<div class="col-md-7 ">
														<input type="text" class="form-control task_end_time" id="meeting_task_end_time" name="taskPlanEndTime" placeholder="任务结束时间" />
														<span><font color="red" id="check_meeting_task_end_time"></font></span>
													</div>
												</div>

											</div>
										</div>
									</div>
								</div>
							</div>
							<div class="row">
								<div class="col-md-2">
									<select id="emp_select" class="form-control" name="meetingTask.motusEmpInfoByUserId.id">
										<s:iterator value="empInfos" status="st">
											<option value="${id}">${name}</option>
										</s:iterator>
									</select>

								</div>
								<div class="col-md-2">
									<input type="text" class="form-control" name="taskTotalPoint" placeholder="分配KPI分值">
									<span><font id="check_task_point" color="red"></font></span>
								</div>
								<div class="col-md-2">
									<button type="button" class="btn btn-primary btn-block">上传文件</button>
								</div>

								<div class="col-md-2">
									<button type="submit" class="btn btn-warning btn-block">分配任务</button>
								</div>
							</div>
						</form>
					</div>
				</div>
				<!-- END MAIN CONTENT -->
			</div>
			<!-- END MAIN -->
			<div class="clearfix"></div>

		</div>
		<!-- END WRAPPER -->
		<!-- Javascript -->
		<script src="scripts/common/jquery-3.2.1.min.js"></script>
		<script src="scripts/common/jquery-ui.min.js"></script>
		<script src="scripts/common/bootstrap.min.js"></script>
		<script src="scripts/common/jquery.slimscroll.min.js"></script>
		<script src="scripts/common/klorofil-common.js"></script>
		<script type="text/javascript" src="scripts/task/manager/new_meeting_task.js"></script>
	</body>

</html>